<template>
  <div class="kkb-container">
    <VirtualList :listData="articles" />
    <!-- <div v-for="article in articles" :key="article._id">
      {{ article.title }}
    </div> -->
  </div>
</template>

<script>
import VirtualList from '~/components/VirtualList.vue'
export default {
  components: {
    VirtualList
  },
  data () {
    return {
      articles: []
    }
  },
  mounted () {
    this.getArticleInfo()
  },
  methods: {
    async getArticleInfo () {
      const ret = await this.$http.get('/article')
      if (ret.code === 0) {
        this.articles = ret.data
      }
    }
  }
}
</script>
